3.12.10 \(\int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx\) [1110]

3.12.10.1 Optimal result
3.12.10.2 Mathematica [A] (verified)
3.12.10.3 Rubi [A] (warning: unable to verify)
3.12.10.4 Maple [A] (verified)
3.12.10.5 Fricas [B] (verification not implemented)
3.12.10.6 Sympy [F]
3.12.10.7 Maxima [F(-2)]
3.12.10.8 Giac [B] (verification not implemented)
3.12.10.9 Mupad [B] (verification not implemented)

3.12.10.1 Optimal result

Integrand size = 30, antiderivative size = 153 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx=-\frac {i (c-i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{2 a f}+\frac {\sqrt {c+i d} (i c+2 d) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{2 a f}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))} \]

output
-1/2*I*(c-I*d)^(3/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/a/f+1/2 
*(I*c+2*d)*arctanh((c+d*tan(f*x+e))^(1/2)/(c+I*d)^(1/2))*(c+I*d)^(1/2)/a/f 
+1/2*(I*c-d)*(c+d*tan(f*x+e))^(1/2)/f/(a+I*a*tan(f*x+e))
 
3.12.10.2 Mathematica [A] (verified)

Time = 0.98 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.88 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx=\frac {-i (c-i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )+\sqrt {c+i d} (i c+2 d) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )+\frac {(c+i d) \sqrt {c+d \tan (e+f x)}}{-i+\tan (e+f x)}}{2 a f} \]

input
Integrate[(c + d*Tan[e + f*x])^(3/2)/(a + I*a*Tan[e + f*x]),x]
 
output
((-I)*(c - I*d)^(3/2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]] + Sq 
rt[c + I*d]*(I*c + 2*d)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]] + 
((c + I*d)*Sqrt[c + d*Tan[e + f*x]])/(-I + Tan[e + f*x]))/(2*a*f)
 
3.12.10.3 Rubi [A] (warning: unable to verify)

Time = 0.76 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.87, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4033, 27, 3042, 4022, 3042, 4020, 25, 73, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)}dx\)

\(\Big \downarrow \) 4033

\(\displaystyle \frac {\int \frac {a \left (2 c^2-3 i d c+d^2\right )+a (c-3 i d) d \tan (e+f x)}{2 \sqrt {c+d \tan (e+f x)}}dx}{2 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {a \left (2 c^2-3 i d c+d^2\right )+a (c-3 i d) d \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {a \left (2 c^2-3 i d c+d^2\right )+a (c-3 i d) d \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 4022

\(\displaystyle \frac {a (c-i d)^2 \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx+a (c+i d) (c-2 i d) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {a (c-i d)^2 \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx+a (c+i d) (c-2 i d) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 4020

\(\displaystyle \frac {\frac {i a (c-i d)^2 \int -\frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{f}-\frac {i a (c+i d) (c-2 i d) \int -\frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{f}}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {i a (c+i d) (c-2 i d) \int \frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{f}-\frac {i a (c-i d)^2 \int \frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{f}}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {\frac {2 a (c-i d)^2 \int \frac {1}{\frac {i \tan ^2(e+f x)}{d}+\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}+\frac {2 a (c+i d) (c-2 i d) \int \frac {1}{-\frac {i \tan ^2(e+f x)}{d}-\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {\frac {2 a (c-i d)^{3/2} \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f}+\frac {2 a \sqrt {c+i d} (c-2 i d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f}}{4 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\)

input
Int[(c + d*Tan[e + f*x])^(3/2)/(a + I*a*Tan[e + f*x]),x]
 
output
((2*a*(c - I*d)^(3/2)*ArcTan[Tan[e + f*x]/Sqrt[c - I*d]])/f + (2*a*Sqrt[c 
+ I*d]*(c - (2*I)*d)*ArcTan[Tan[e + f*x]/Sqrt[c + I*d]])/f)/(4*a^2) + ((I* 
c - d)*Sqrt[c + d*Tan[e + f*x]])/(2*f*(a + I*a*Tan[e + f*x]))
 

3.12.10.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4020
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f)   Subst[Int[(a + (b/d)*x)^m/(d^2 + 
c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ 
b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
 

rule 4022
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2   Int[(a + b*Tan[e + f*x])^m*( 
1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2   Int[(a + b*Tan[e + f*x])^m 
*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c 
 - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]
 

rule 4033
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*tan[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((c + d*Tan[e + f*x])^(n - 1)/( 
2*a*f*(a + b*Tan[e + f*x]))), x] + Simp[1/(2*a^2)   Int[(c + d*Tan[e + f*x] 
)^(n - 2)*Simp[a*c^2 + a*d^2*(n - 1) - b*c*d*n - d*(a*c*(n - 2) + b*d*n)*Ta 
n[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] 
 && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[n, 1]
 
3.12.10.4 Maple [A] (verified)

Time = 0.68 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.92

method result size
derivativedivides \(\frac {2 d^{2} \left (\frac {\left (i d +c \right ) \left (-\frac {d \sqrt {c +d \tan \left (f x +e \right )}}{-d \tan \left (f x +e \right )+i d}-\frac {\left (i c +2 d \right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{\sqrt {-i d -c}}\right )}{4 d^{2}}+\frac {i \left (i d -c \right )^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{4 d^{2}}\right )}{f a}\) \(140\)
default \(\frac {2 d^{2} \left (\frac {\left (i d +c \right ) \left (-\frac {d \sqrt {c +d \tan \left (f x +e \right )}}{-d \tan \left (f x +e \right )+i d}-\frac {\left (i c +2 d \right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{\sqrt {-i d -c}}\right )}{4 d^{2}}+\frac {i \left (i d -c \right )^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{4 d^{2}}\right )}{f a}\) \(140\)

input
int((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e)),x,method=_RETURNVERBOSE)
 
output
2/f/a*d^2*(1/4*(c+I*d)/d^2*(-d*(c+d*tan(f*x+e))^(1/2)/(-d*tan(f*x+e)+I*d)- 
(I*c+2*d)/(-I*d-c)^(1/2)*arctan((c+d*tan(f*x+e))^(1/2)/(-I*d-c)^(1/2)))+1/ 
4*I*(I*d-c)^(3/2)/d^2*arctan((c+d*tan(f*x+e))^(1/2)/(I*d-c)^(1/2)))
 
3.12.10.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 780 vs. \(2 (115) = 230\).

Time = 0.30 (sec) , antiderivative size = 780, normalized size of antiderivative = 5.10 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx=\frac {{\left (a f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (-\frac {2 \, {\left (-i \, c^{2} - c d + {\left (a f e^{\left (2 i \, f x + 2 i \, e\right )} + a f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{2} f^{2}}} + {\left (-i \, c^{2} - 2 \, c d + i \, d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{i \, c + d}\right ) - a f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (-\frac {2 \, {\left (-i \, c^{2} - c d - {\left (a f e^{\left (2 i \, f x + 2 i \, e\right )} + a f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{2} f^{2}}} + {\left (-i \, c^{2} - 2 \, c d + i \, d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{i \, c + d}\right ) + a f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 4 i \, d^{3}}{a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (\frac {{\left (i \, c^{2} + c d + 2 i \, d^{2} + {\left (a f e^{\left (2 i \, f x + 2 i \, e\right )} + a f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 4 i \, d^{3}}{a^{2} f^{2}}} + {\left (i \, c^{2} + 2 \, c d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a f}\right ) - a f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 4 i \, d^{3}}{a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (\frac {{\left (i \, c^{2} + c d + 2 i \, d^{2} - {\left (a f e^{\left (2 i \, f x + 2 i \, e\right )} + a f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 4 i \, d^{3}}{a^{2} f^{2}}} + {\left (i \, c^{2} + 2 \, c d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a f}\right ) + 2 \, {\left ({\left (i \, c - d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, a f} \]

input
integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e)),x, algorithm="fricas")
 
output
1/8*(a*f*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^2*f^2))*e^(2*I*f*x + 
 2*I*e)*log(-2*(-I*c^2 - c*d + (a*f*e^(2*I*f*x + 2*I*e) + a*f)*sqrt(((c - 
I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(c^3 
- 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^2*f^2)) + (-I*c^2 - 2*c*d + I*d^2)*e^(2* 
I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/(I*c + d)) - a*f*sqrt(-(c^3 - 3*I*c^2 
*d - 3*c*d^2 + I*d^3)/(a^2*f^2))*e^(2*I*f*x + 2*I*e)*log(-2*(-I*c^2 - c*d 
- (a*f*e^(2*I*f*x + 2*I*e) + a*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c 
+ I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3 
)/(a^2*f^2)) + (-I*c^2 - 2*c*d + I*d^2)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 
 2*I*e)/(I*c + d)) + a*f*sqrt(-(c^3 - 3*I*c^2*d - 4*I*d^3)/(a^2*f^2))*e^(2 
*I*f*x + 2*I*e)*log(1/2*(I*c^2 + c*d + 2*I*d^2 + (a*f*e^(2*I*f*x + 2*I*e) 
+ a*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) 
 + 1))*sqrt(-(c^3 - 3*I*c^2*d - 4*I*d^3)/(a^2*f^2)) + (I*c^2 + 2*c*d)*e^(2 
*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/(a*f)) - a*f*sqrt(-(c^3 - 3*I*c^2*d 
- 4*I*d^3)/(a^2*f^2))*e^(2*I*f*x + 2*I*e)*log(1/2*(I*c^2 + c*d + 2*I*d^2 - 
 (a*f*e^(2*I*f*x + 2*I*e) + a*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + 
 I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(c^3 - 3*I*c^2*d - 4*I*d^3)/(a^2*f^ 
2)) + (I*c^2 + 2*c*d)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/(a*f)) + 2 
*((I*c - d)*e^(2*I*f*x + 2*I*e) + I*c - d)*sqrt(((c - I*d)*e^(2*I*f*x + 2* 
I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-2*I*f*x - 2*I*e)/(a*f)
 
3.12.10.6 Sympy [F]

\[ \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx=- \frac {i \left (\int \frac {c \sqrt {c + d \tan {\left (e + f x \right )}}}{\tan {\left (e + f x \right )} - i}\, dx + \int \frac {d \sqrt {c + d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}}{\tan {\left (e + f x \right )} - i}\, dx\right )}{a} \]

input
integrate((c+d*tan(f*x+e))**(3/2)/(a+I*a*tan(f*x+e)),x)
 
output
-I*(Integral(c*sqrt(c + d*tan(e + f*x))/(tan(e + f*x) - I), x) + Integral( 
d*sqrt(c + d*tan(e + f*x))*tan(e + f*x)/(tan(e + f*x) - I), x))/a
 
3.12.10.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx=\text {Exception raised: RuntimeError} \]

input
integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e)),x, algorithm="maxima")
 
output
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati 
ve exponent.
 
3.12.10.8 Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 411 vs. \(2 (115) = 230\).

Time = 0.48 (sec) , antiderivative size = 411, normalized size of antiderivative = 2.69 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx=\frac {1}{2} \, d^{2} {\left (\frac {\sqrt {d \tan \left (f x + e\right ) + c} c + i \, \sqrt {d \tan \left (f x + e\right ) + c} d}{{\left (d \tan \left (f x + e\right ) - i \, d\right )} a d f} - \frac {2 \, {\left (i \, c^{2} + c d + 2 i \, d^{2}\right )} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} + i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{a \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d^{2} f {\left (\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} - \frac {2 \, {\left (-i \, c^{2} - 2 \, c d + i \, d^{2}\right )} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} - i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{a \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d^{2} f {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}}\right )} \]

input
integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e)),x, algorithm="giac")
 
output
1/2*d^2*((sqrt(d*tan(f*x + e) + c)*c + I*sqrt(d*tan(f*x + e) + c)*d)/((d*t 
an(f*x + e) - I*d)*a*d*f) - 2*(I*c^2 + c*d + 2*I*d^2)*arctan(2*(sqrt(d*tan 
(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-2*c 
+ 2*sqrt(c^2 + d^2)) + I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2 
)*sqrt(-2*c + 2*sqrt(c^2 + d^2))))/(a*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d^2*f 
*(I*d/(c - sqrt(c^2 + d^2)) + 1)) - 2*(-I*c^2 - 2*c*d + I*d^2)*arctan(2*(s 
qrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*s 
qrt(-2*c + 2*sqrt(c^2 + d^2)) - I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt( 
c^2 + d^2)*sqrt(-2*c + 2*sqrt(c^2 + d^2))))/(a*sqrt(-2*c + 2*sqrt(c^2 + d^ 
2))*d^2*f*(-I*d/(c - sqrt(c^2 + d^2)) + 1)))
 
3.12.10.9 Mupad [B] (verification not implemented)

Time = 7.86 (sec) , antiderivative size = 847, normalized size of antiderivative = 5.54 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{a+i a \tan (e+f x)} \, dx=-2\,\mathrm {atanh}\left (\frac {20\,a^2\,d^6\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {c^3}{16\,a^2\,f^2}+\frac {d^3\,1{}\mathrm {i}}{4\,a^2\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{16\,a^2\,f^2}}}{3{}\mathrm {i}\,a\,f\,c^4\,d^4+11\,a\,f\,c^3\,d^5-7{}\mathrm {i}\,a\,f\,c^2\,d^6+11\,a\,f\,c\,d^7-10{}\mathrm {i}\,a\,f\,d^8}+\frac {a^2\,c\,d^5\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {c^3}{16\,a^2\,f^2}+\frac {d^3\,1{}\mathrm {i}}{4\,a^2\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{16\,a^2\,f^2}}\,32{}\mathrm {i}}{3{}\mathrm {i}\,a\,f\,c^4\,d^4+11\,a\,f\,c^3\,d^5-7{}\mathrm {i}\,a\,f\,c^2\,d^6+11\,a\,f\,c\,d^7-10{}\mathrm {i}\,a\,f\,d^8}-\frac {12\,a^2\,c^2\,d^4\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {c^3}{16\,a^2\,f^2}+\frac {d^3\,1{}\mathrm {i}}{4\,a^2\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{16\,a^2\,f^2}}}{3{}\mathrm {i}\,a\,f\,c^4\,d^4+11\,a\,f\,c^3\,d^5-7{}\mathrm {i}\,a\,f\,c^2\,d^6+11\,a\,f\,c\,d^7-10{}\mathrm {i}\,a\,f\,d^8}\right )\,\sqrt {\frac {-2\,c^3+c^2\,d\,6{}\mathrm {i}+d^3\,8{}\mathrm {i}}{32\,a^2\,f^2}}-2\,\mathrm {atanh}\left (\frac {20\,a^2\,d^6\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {\frac {3\,c\,d^2}{16\,a^2\,f^2}-\frac {d^3\,1{}\mathrm {i}}{16\,a^2\,f^2}-\frac {c^3}{16\,a^2\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{16\,a^2\,f^2}}}{3{}\mathrm {i}\,a\,f\,c^4\,d^4+8\,a\,f\,c^3\,d^5-2{}\mathrm {i}\,a\,f\,c^2\,d^6+8\,a\,f\,c\,d^7-5{}\mathrm {i}\,a\,f\,d^8}-\frac {a^2\,c\,d^5\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {\frac {3\,c\,d^2}{16\,a^2\,f^2}-\frac {d^3\,1{}\mathrm {i}}{16\,a^2\,f^2}-\frac {c^3}{16\,a^2\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{16\,a^2\,f^2}}\,8{}\mathrm {i}}{3{}\mathrm {i}\,a\,f\,c^4\,d^4+8\,a\,f\,c^3\,d^5-2{}\mathrm {i}\,a\,f\,c^2\,d^6+8\,a\,f\,c\,d^7-5{}\mathrm {i}\,a\,f\,d^8}+\frac {12\,a^2\,c^2\,d^4\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {\frac {3\,c\,d^2}{16\,a^2\,f^2}-\frac {d^3\,1{}\mathrm {i}}{16\,a^2\,f^2}-\frac {c^3}{16\,a^2\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{16\,a^2\,f^2}}}{3{}\mathrm {i}\,a\,f\,c^4\,d^4+8\,a\,f\,c^3\,d^5-2{}\mathrm {i}\,a\,f\,c^2\,d^6+8\,a\,f\,c\,d^7-5{}\mathrm {i}\,a\,f\,d^8}\right )\,\sqrt {\frac {-2\,c^3+c^2\,d\,6{}\mathrm {i}+6\,c\,d^2-d^3\,2{}\mathrm {i}}{32\,a^2\,f^2}}-\frac {\left (d^2\,1{}\mathrm {i}+c\,d\right )\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,a\,f\,\left (-d\,\mathrm {tan}\left (e+f\,x\right )+d\,1{}\mathrm {i}\right )} \]

input
int((c + d*tan(e + f*x))^(3/2)/(a + a*tan(e + f*x)*1i),x)
 
output
- 2*atanh((20*a^2*d^6*f^2*(c + d*tan(e + f*x))^(1/2)*((d^3*1i)/(4*a^2*f^2) 
 - c^3/(16*a^2*f^2) + (c^2*d*3i)/(16*a^2*f^2))^(1/2))/(11*a*c*d^7*f - a*d^ 
8*f*10i - a*c^2*d^6*f*7i + 11*a*c^3*d^5*f + a*c^4*d^4*f*3i) + (a^2*c*d^5*f 
^2*(c + d*tan(e + f*x))^(1/2)*((d^3*1i)/(4*a^2*f^2) - c^3/(16*a^2*f^2) + ( 
c^2*d*3i)/(16*a^2*f^2))^(1/2)*32i)/(11*a*c*d^7*f - a*d^8*f*10i - a*c^2*d^6 
*f*7i + 11*a*c^3*d^5*f + a*c^4*d^4*f*3i) - (12*a^2*c^2*d^4*f^2*(c + d*tan( 
e + f*x))^(1/2)*((d^3*1i)/(4*a^2*f^2) - c^3/(16*a^2*f^2) + (c^2*d*3i)/(16* 
a^2*f^2))^(1/2))/(11*a*c*d^7*f - a*d^8*f*10i - a*c^2*d^6*f*7i + 11*a*c^3*d 
^5*f + a*c^4*d^4*f*3i))*((c^2*d*6i - 2*c^3 + d^3*8i)/(32*a^2*f^2))^(1/2) - 
 2*atanh((20*a^2*d^6*f^2*(c + d*tan(e + f*x))^(1/2)*((3*c*d^2)/(16*a^2*f^2 
) - (d^3*1i)/(16*a^2*f^2) - c^3/(16*a^2*f^2) + (c^2*d*3i)/(16*a^2*f^2))^(1 
/2))/(8*a*c*d^7*f - a*d^8*f*5i - a*c^2*d^6*f*2i + 8*a*c^3*d^5*f + a*c^4*d^ 
4*f*3i) - (a^2*c*d^5*f^2*(c + d*tan(e + f*x))^(1/2)*((3*c*d^2)/(16*a^2*f^2 
) - (d^3*1i)/(16*a^2*f^2) - c^3/(16*a^2*f^2) + (c^2*d*3i)/(16*a^2*f^2))^(1 
/2)*8i)/(8*a*c*d^7*f - a*d^8*f*5i - a*c^2*d^6*f*2i + 8*a*c^3*d^5*f + a*c^4 
*d^4*f*3i) + (12*a^2*c^2*d^4*f^2*(c + d*tan(e + f*x))^(1/2)*((3*c*d^2)/(16 
*a^2*f^2) - (d^3*1i)/(16*a^2*f^2) - c^3/(16*a^2*f^2) + (c^2*d*3i)/(16*a^2* 
f^2))^(1/2))/(8*a*c*d^7*f - a*d^8*f*5i - a*c^2*d^6*f*2i + 8*a*c^3*d^5*f + 
a*c^4*d^4*f*3i))*((6*c*d^2 + c^2*d*6i - 2*c^3 - d^3*2i)/(32*a^2*f^2))^(1/2 
) - ((c*d + d^2*1i)*(c + d*tan(e + f*x))^(1/2))/(2*a*f*(d*1i - d*tan(e ...